package controller.listeners;

import java.awt.event.ActionEvent;

import controller.decoders.StatusActionEventDecoder;
import controller.dispatchers.AbstractDispatcher;
import controller.factories.CommandFactory;

public class StatusViewActionListener extends AbstractActionListener
{
	public StatusViewActionListener(
			AbstractDispatcher modelDispatcher,
			AbstractDispatcher viewDispatcher,
			CommandFactory modelCommandFactory,
			CommandFactory viewCommandFactory)
	{
		this.eventDecoder = new StatusActionEventDecoder(
				this, 
				modelDispatcher,
				viewDispatcher, 
				modelCommandFactory, 
				viewCommandFactory);
		
		startWorker();
		
		System.out.println("[CONTROLLER] " + toString() + " created a " + 
				eventDecoder.toString() + " worker thread.");
	}
	
	public String toString()
	{
		return "StatusViewActionListener";
	}
}